package fr.greta.centre.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

import javax.naming.NamingException;

public class StatistiquesDAOImpl implements StatistiquesDAO{

	@Override
	public ArrayList<String> findLesCp() {
		ArrayList<String> lesCp = new ArrayList<String>();
		String sql = "SELECT cp FROM candidat";
		Statement st;
		try {
			st = Bd.getConnect().createStatement();
			ResultSet rs = st.executeQuery(sql);
			while(rs.next()){
				lesCp.add(rs.getString("cp"));
			}
		return lesCp;
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
